home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
a_utils
/
perl
/
prlbkxmp.lha
/
ch3
/
here
< prev
next >
Wrap
Text File
|
1991-01-07
|
731b
|
34 lines
#!/usr/bin/perl
$price = '$100';
print <<EOF; # Same as earlier example.
The price is $Price.
EOF
print <<"EOF"; # The same with explicit quotes
The price is $Price.
EOF
print <<'EOF'; # A single-quoted quote.
All things (e.g. a camel's journey through
A needle's eye) are possible, it's true.
But picture how the camel feels, squeezed out
In one long bloody thread, from tail to snout.
-- C.S. Lewis
EOF
print << x 10; # Print next line 10 times;
The camels are coming! Hurrah! Hurrah!
print <<`EOC`; # Execute commands!
echo 'Your .vacation.msg file says:'
cat .vacation.msg
EOC
print <<foo, <<bar; # You can stack them.
He said bactrian.
foo
She said dromedary.
bar